package cn.iocoder.yudao.module.mqtt.controller.admin.devicealermrecord.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 报警记录 Response VO")
@Data
@ExcelIgnoreUnannotated
public class DeviceAlermRecordRespVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "31172")
    @ExcelProperty("主键ID")
    private Long id;

    @Schema(description = "订阅客户端ID", example = "11174")
    @ExcelProperty("订阅客户端ID")
    private Long subscribeWaterId;

    @Schema(description = "设备KEY", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("设备KEY")
    private String deviceKey;

    @Schema(description = "报警类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty(value = "报警类型", converter = DictConvert.class)
    @DictFormat("mqtt_alarm_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String alarmType;

    @Schema(description = "数据类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "数据类型", converter = DictConvert.class)
    @DictFormat("mqtt_device_report_data_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String dataType;

    @Schema(description = "报警的值")
    @ExcelProperty("报警的值")
    private String exceedValue;

    @Schema(description = "报文")
    private String mqttInfo;

    @Schema(description = "报警信息", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("报警信息")
    private String alarmInfo;

    @Schema(description = "微信通知： 0 关闭不通知 1等待通知，2 已经通知", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "微信通知： 0 关闭不通知 1等待通知，2 已经通知", converter = DictConvert.class)
    @DictFormat("mqtt_alarm_push") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String isWeixin;

    @Schema(description = "短信通知： 0 关闭不通知 1等待通知    2已通知", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty(value = "短信通知： 0 关闭不通知 1等待通知    2已通知", converter = DictConvert.class)
    @DictFormat("mqtt_alarm_push") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String isQms;

    @Schema(description = "0 离线 1 在线 ", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("0 离线 1 在线 ")
    private String isOnline;

    @Schema(description = "描述", example = "随便")
    @ExcelProperty("描述")
    private String description;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}